package com.ruoyi.yuyuan.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.yuyuan.Entity.BlogDeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: kestrel
 * @Version:1.0
 * @Date: 2024/5/29
 */
@Mapper
public interface DealBlogMapper extends BaseMapper<BlogDeal> {
    @Select("select * from tb_blog_deal where id < #{start} and status < 2 order by create_time DESC,id DESC limit 6")
    public List<BlogDeal> getDeals(Long start);
    @Select("select max(id) from tb_blog_deal where status < 2 order by id limit 1")
    Long getMaxStartId();

    BlogDeal queryHotBlog();
}
